<p id="notice"><%= notice %></p>

<h3>Listing Pages</h3>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Featured</th>
      <th>Category</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @pages.each do |page| %>
      <tr>
        <td><%= page.title %></td>
        <td><%= page.featured %></td>
        <td><%= page.category.name %></td>
        <td><%= link_to 'Show', page %></td>
        <td><%= link_to 'Edit', edit_page_path(page) %></td>
        <td><%= link_to 'Destroy', page, method: :delete, data: { confirm: "Are you sure?" } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Page', new_page_path %>
